/**
*      author: Y_Yao
*      created: 2025-03-22 20:17:20
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 9e18;
const int INF = 0x3f3f3f3f;
const int N = 2e5 + 7;
int n,r,c;
string s;
set<pair<int,int>> s1;

void solve()
{
    cin >> n >> r >> c;
    cin >> s;
    int x = 0, y = 0;
    for(int i = 0;i < s.size();i++)
    {
        char op = s[i];
        int dx = 0,dy = 0;
        if(op == 'N') dx = -1;
        else if(op == 'S') dx = 1; 
        else if(op == 'E') dy = 1;
        else dy = -1;
        s1.insert({x,y});
        x -= dx,y -= dy;
        int px = x + r,py = y + c;
        if(s1.count({px,py}))
        {
            cout << 1;
        }
        else
        {
            cout << 0;
        }
    }
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}